
class Person implements Cloneable{
    public String name="zangsan";
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}



public class Test {
    public static void main(String[] args)throws CloneNotSupportedException{
        Person person1=new Person();
        Person person2=(Person)person1.clone();
        person2.name="good";
        System.out.println(person1.name);
        System.out.println(person2.name);

    }
}
